package com.cskaoyan.bean.issue.po;

import lombok.Data;

import java.util.Date;

/**
 * @author LiangRuiJiang
 * @since 2022/06/04  18:53
 */
@Data
public class IssuePo {

    private boolean deleted;
    private String question;
    private String answer;
    private Date addTime;
    private Date updateTime;
    private Integer id;

    private int deletedInt;

    public void setDeletedInt(int deletedInt) {
        this.deletedInt = deletedInt;
        if (deletedInt == 0){
            //问题默认情况下为0
            deleted = false;
        }else{
            deleted = true;
        }
    }

    public IssuePo() {
    }

    public IssuePo(boolean deleted, String question, String answer, Date addTime, Date updateTime, Integer id) {
        this.deleted = deleted;
        this.question = question;
        this.answer = answer;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.id = id;
    }
}
